-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for PIX 6-308001 6-605005, and 6-605004 #1124
base: master
Are you sure you want to change the base?
Conversation
If someone can help me figure out how to accept either word characters, or asterisks (*) between the quotes (") then I'd be happy to update the single rule to include username in all cases. |
|
While that is true, it unfortunately then chomps the " characters and fails to match properly. |
I've run into this before. Can't remember how I solved it off hand. |
Not sure if you ever figured it out but this piece of Regex maybe what you need
Can also add additional punctuation if required e.g. (Not sure what chars Pix/ASA will accept, but should test for all) |
Actually after further thinking about \S matches all non space so should work. Greediness should exclude the chomping of " %ASA-6-605005: Login permitted from 198.18.1.100/47849 to outside:198.18.1.254/ssh for user "us3rn@m3" This piece of code breaks them out into $1, $2, $3, $4, $5 |
@Know1 unfortunately OSSEC does not use perl compatible regex (PCRE) #199 So while a regex tester may indicate success, the only true test for OSSEC is to use the ossec-logtest tool which comes with the installation. I may have missued the term chomp, but the \S includes the quote (") character and doesn't work. Also OSSEC regex does not appear to support creating classes (e.g. [aA-zZ0-9*@]), although I haven't retested this in awhile, and my role on the ossec project at work is over, so I may not have time to retest. |
Hello Sunshine |
Through further testing with PIX and ASA we have updated the decoder once more to support the current state of the ASA software.
It was noticed that in Cisco ASA as apposed to PIX. the username is not provided in 6-605004. We think this is a security enhancement Cisco made, if a user fails to log in it is possible that a password was improperly put into the username field and thus it shouldn't be logged. Cisco instead puts asterisks(*) in place for the user on 605004
The only way we could see to fix the decoder for this was to remove the username from being selected. Perhaps someone with a better understanding of OSSEC regex could create something better.
Some more example logs and their phase 2 output before the fix.
Examples are also in the comment section of the decoder.xml.
Log test output after the fix.
This change is